package fr.mmt.gisfizz.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;

/**
 * Abstract entity.
 *
 * @author Mathieu MAST
 */
@MappedSuperclass
@ToString
@EqualsAndHashCode
public class AbstractEntity implements Serializable {

    static private final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid2")
    @Column(name = "id")
    @Getter
    @Setter
    private String id;
}
